<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>再见Vue</title>
  <script src="../js/vue.js"></script>
</head>

<body>
  <div id="app">
    {{msg}}
    <button v-on:click="clickHandler">修改数据</button>
    <p v-bind:title="title">v-bind指令</p>
    <div class="content" v-html="content">

    </div>
    <input type="text" v-on:input="inputHandler">
    <input type="text" @input="inputHandler">
  </div>
  <script>
    let vm = new Vue({
      el: '#app',
      data: {
        msg: 'hello vue',
        title: '我是P标签',
        content: '<h3>我是3级标题</h3>'
      },
      methods: {
        clickHandler() {
          this.msg = '你好 vue'
        },
        inputHandler(event) {
          console.log(event.target.value);
        }
      }
    })
  </script>
</body>

</html>